<%--
  Created by IntelliJ IDEA.
  User: dzw
  Date: 2018/3/15
  Time: 10:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<div class="row">
<div class="col-md-6">
  <table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
      <th colspan="3">女性</th>
    </tr>
    <tr>
      <th>序号</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
    </thead>
    <tbody>
      <c:forEach items="${personList0}" var="person" varStatus="index">
      <tr>
        <td>${index.index+1}</td>
        <td><a href="javascript:void(0)" onclick="openPerson('${person.id}')">${person.name}</a></td>
        <td>${person.age}</td>
      </tr>
      </c:forEach>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
      <th colspan="3">男性</th>
    </tr>
    <tr>
      <th>序号</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${personList1}" var="person" varStatus="index">
      <tr>
        <td>${index.index+1}</td>
        <td><a href="javascript:void(0)" onclick="openPerson('${person.id}')">${person.name}</a></td>
        <td>${person.age}</td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
</div>

</div>

<script>

  function openPerson(personId){
    if(personId!="" && personId!=null){
      __open_dialog_form_read("人员信息","<%=path%>/com/person/personInfo?keyId="+personId);
    }else{
      __toastr_error("找不到人员ID");
    }
  }

</script>